package com.xuelang.pipeline.app.pipeline;

import com.xuelang.pipeline.domain.pipeline.Pipeline;
import com.xuelang.pipeline.domain.pipeline.TriggerSetting;
import org.quartz.SchedulerException;

/**
 * <p>流水线定时任务服务接口</p>
 *
 * @author : yixin.lys
 * @date : 2024-06-11 17:28
 **/
public interface PipelineSchedulerService {

    /**
     * 新增定时任务
     * @param pipeline
     * @param triggerSetting
     */
    void addJob(Pipeline pipeline, TriggerSetting triggerSetting) throws SchedulerException;

    /**
     * 更新定时任务
     * @param pipeline
     * @param triggerSetting
     */
    void updateJob(Pipeline pipeline, TriggerSetting triggerSetting) throws SchedulerException;

    /**
     * 删除定时任务
     * @param pipeline
     */
    void removeJob(Pipeline pipeline) throws SchedulerException;

}
